<html>
<head><meta charset="utf-8"><title>Structural typing types API · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html">Structural typing types API</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="180890767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Structural%20typing%20types%20API/near/180890767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html#180890767">(Nov 16 2019 at 02:23)</a>:</h4>
<p>Hello, may i ask a language design question here?</p>



<a name="180890807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Structural%20typing%20types%20API/near/180890807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html#180890807">(Nov 16 2019 at 02:24)</a>:</h4>
<p>I believe currently tuples are the only structural typing types in the language, and the API surface for tuples is especially lacking.</p>



<a name="180890831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Structural%20typing%20types%20API/near/180890831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html#180890831">(Nov 16 2019 at 02:25)</a>:</h4>
<p>Both 'creating' tuples from code and 'reflection' on the internal structure of tuples are not satisfying.</p>



<a name="180890963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Structural%20typing%20types%20API/near/180890963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html#180890963">(Nov 16 2019 at 02:28)</a>:</h4>
<p>The <code>Fn*</code> series traits have long been blocking on this affair settled, with the consideration of supporting variadic arguments.</p>



<a name="180891118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Structural%20typing%20types%20API/near/180891118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Structural.20typing.20types.20API.html#180891118">(Nov 16 2019 at 02:32)</a>:</h4>
<p>I've beening thinking, whether allowing <em>all</em> structural typing values as arguments of Fn* traits, and design some minimal reflection-like API for all structural typing values is feasible. This will unblock the <code>Fn*</code> traits stablization, i think.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>